<!DOCTYPE html>
<!--
==========================================================================
云捷GO自动生成列表页面代码,只生成一次,按需修改.
生成日期：2021-06-28 22:20:45 +0800 CST
生成路径: template/module/tenant/list.html
生成人：robnote
==========================================================================
-->
<html lang="zh">
<head>
    {{template "header" (OssUrl)}}
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>    
                        <li>
                            <p>商户名称：</p>
                            <input type="text" name="name"/>
                        </li>
                            
                        <li>
                            <p>联系地址：</p>
                            <input type="text" name="address"/>
                        </li>
                                  
                        <li class="select-time">
                            <p>起租时间：</p>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
                        </li>      
                        <li class="select-time">
                            <p>结束时间：</p>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
                        </li>      
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            {{getPermiButton .uid "module:tenant:add" "$.operate.add()" "新增" "btn btn-success" "fa fa-plus"}}
            {{getPermiButton .uid "module:tenant:edit" "$.operate.edit()" "修改" "btn btn-primary single disabled" "fa fa-edit"}}
            {{getPermiButton .uid "module:tenant:remove" "$.operate.removeAll()" "删除" "btn btn-danger multiple disabled" "fa fa-remove"}}
            {{getPermiButton .uid "module:tenant:export" "$.table.exportExcel()" "导出" "btn btn-warning" "fa fa-download"}}
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
{{template "footer" (OssUrl)}}
<script type="text/javascript">
    var editFlag = '{{hasPermi .uid "module:tenant:edit"}}';
    var removeFlag = '{{hasPermi .uid "module:tenant:remove"}}';

                      
    var prefix = ctx + "module/tenant";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit?id={id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "商户信息",
            columns: [
                {
                    checkbox: true
                },  
                {
                    field: 'id',
                    title: 'ID',
                    visible: false
                },     
                {
                    field: 'name',
                    title: '商户名称'
                },      
                {
                    field: 'address',
                    title: '联系地址'
                },      
                {
                    field: 'manager',
                    title: '负责人'
                },      
                {
                    field: 'phone',
                    title: '联系电话'
                },      
                {
                    field: 'remark',
                    title: '备注信息'
                },      
                {
                    field: 'start_time',
                    title: '起租时间'
                },      
                {
                    field: 'end_time',
                    title: '结束时间'
                },      
                {
                    field: 'email',
                    title: '安全邮箱'
                },    
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>